import axios from "axios";

const url = "http://localhost:3000"

export const login = (username, password) => {
    return axios.post(url+'/api/login', { username, password });
};

// 定义获取用户信息请求方法
export const getUserInfo = (userId) => {
    return axios.get(`${url}/api/users/${userId}`);
};